package com.sdleyou.treepro.common.model.dto;

import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import com.fasterxml.jackson.databind.annotation.JsonNaming;
import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;
import java.util.List;

@Data
@JsonNaming(value = PropertyNamingStrategy.SnakeCaseStrategy.class)
public class TreeDTO {
    @NotEmpty(message = "树木名称不能为空")
    private String treeName;

    @NotEmpty(message = "树木描述不能为空")
    private String treeDesc;

    @NotEmpty(message = "树木图标不能为空")
    private String treeIcon;

    private List<String> treeImage;

    @NotEmpty(message = "树木成长值不能为空")
    @Min(value = 0, message = "成长值不能少于0")
    private Integer growValue;

    @NotEmpty(message = "兑换能量不能为空")
    @Min(value = 0, message = "能量不能少于0")
    private Integer powerValue;

    private String isShow;

    @NotEmpty(message = "价格不能为空")
    @Min(value = 0, message = "价格不能少于0")
    private Double treePrice;

    @NotEmpty(message = "详情图不能为空")
    private String treeInfoImg;
}
